package aom.ju.ss.mode

data class GoodsInfo(
    val code: Int,
    val count: Int,
    val `data`: GoodsInfoData,
    val error_type: Int,
    val msg: String,
)

data class shop_info(
    val address: String,
    val audit_status_text: String,
    val earnest_status_text: String,
    val is_live: Int,
    val lat: Double,
    val lng: Double,
    val logo: String,
    val name: String,
    val region_info: String,
    val status_text: String
)

data class GoodsInfoData(
    val audit_remark: String = "",
    val shop_info: shop_info,
    val audit_status: Int = 0,
    val audit_status_text: String = "",
    val audit_time: String = "",
    val category_id_one: Int = 0,
    val category_id_three: Int = 0,
    val category_id_two: Int = 0,
    val city_id: Int = 0,
    val created_at: String = "",
    val deleted_at: String = "",
    val id: Int = 0,
    val image: String = "",
    val images: List<GoodsInfoDataSkuImage>? = arrayListOf(),
    val inventory: Int = 0,
    val is_sync: Int = 0,
    val market_price: String = "",
    val name: String = "",
    val price: String = "",
    val sales: Int = 0,
    val shop_category_id_one: Int = 0,
    val shop_category_id_three: Int = 0,
    val shop_category_id_two: Int = 0,
    val shop_id: Int = 0,
    val sort: Int = 0,
    val status: Int = 0,
    val status_text: String = "",
    val type: Int = 0,////类型  1普通商品  2砍价商品  3抢券商品  4易货商品
    val updated_at: String = "",
    var ps: Boolean = true,//是否配送
    var goodsInfoShop_infoMode: goodsInfoShopInfoMode?,
    var is_afhalen: String = "",//1 支持 2 不支持 3 只支持
    var freight_tmp_id: String = "",// 0 包邮 1 不包邮

) {


    var skus: MutableList<GoodsInfoDataSku>? = null
        get() {
            if (field == null) {
                field = arrayListOf()
            }
            return field
        }
}

data class goodsInfoShopInfoMode(
    val address: String,
    val audit_status_text: String,
    val earnest_status_text: String,
    val is_live: Int,
    val lat: Any,
    val lng: Any,
    val logo: String,
    val name: String,
    val region_info: String,
    val status_text: String
)

data class GoodsInfoDataSkuImage(
    val image: String,
    val type: Int
)

class GoodsInfoDataSku {
    var cut_people: Int = 0
    var cut_time: Int = 0
    var cut_total_commission: String = ""
    var end_time: Int = 0
    var give_cut_coupon_num: Int = 0
    var id: Int = 0
    var image: String = ""
    var is_permanent_validity: Int = 0
    var name: String = ""
    var price: String = ""
    var num: String = ""


    var inventory: Int? = 0
        get() {
            if (field == null) {
                field = 0
            }
            return field
        }
}